]> dgit.raspbian.org Git - lgogdownloader.git/commitdiff
Avoid storing non-reproducible information
authorStephen Kitt <skitt@debian.org>
Tue, 15 Sep 2026 11:43:59 +0000 (13:43 +0200)
committerStephen Kitt <skitt@debian.org>
Tue, 15 Sep 2026 11:43:59 +0000 (13:43 +0200)
This drops git information as well as the build architecture (from the
user agent). The former varies depending on the availability of git
tools, the latter varies depending on the build host.

Gbp-Pq: Name reproducible.patch

CMakeLists.txt

index 336240b1f07c2a78b9dfde4374d2dd5715b31846..a986224842673a4780e7727e873b8a9b02759b80 100644 (file)
@@ -34,46 +34,9 @@ set(SRC_FILES
 )
 
 
-set(GIT_CHECKOUT FALSE)
-if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
-  if(NOT EXISTS "${PROJECT_SOURCE_DIR}/.git/shallow")
-    find_package(Git)
-    if(GIT_FOUND)
-      set(GIT_CHECKOUT TRUE)
-    else(GIT_FOUND)
-      message(WARNING "Git executable not found")
-    endif(GIT_FOUND)
-  else(NOT EXISTS "${PROJECT_SOURCE_DIR}/.git/shallow")
-    message(STATUS "Shallow Git clone detected, not attempting to retrieve version info")
-  endif(NOT EXISTS "${PROJECT_SOURCE_DIR}/.git/shallow")
-endif(EXISTS "${PROJECT_SOURCE_DIR}/.git")
-
-if(GIT_CHECKOUT)
-  execute_process(COMMAND ${GIT_EXECUTABLE} diff --shortstat
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    OUTPUT_VARIABLE GIT_SHORTSTAT
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-  execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    OUTPUT_VARIABLE GIT_REV_PARSE
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-  if(GIT_SHORTSTAT)
-    set(GIT_DIRTY ON)
-  endif(GIT_SHORTSTAT)
-
-  if(GIT_DIRTY)
-    set(PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}M")
-  endif(GIT_DIRTY)
-
-  set(PROJECT_VERSION_PATCH ${GIT_REV_PARSE})
-  set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
-endif(GIT_CHECKOUT)
-
 set(VERSION_NUMBER ${PROJECT_VERSION})
 set(VERSION_STRING "LGOGDownloader ${VERSION_NUMBER}")
-set(DEFAULT_USER_AGENT "LGOGDownloader/${VERSION_NUMBER} (${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})")
+set(DEFAULT_USER_AGENT "LGOGDownloader/${VERSION_NUMBER}")
 
 add_compile_definitions(_FILE_OFFSET_BITS=64 VERSION_NUMBER="${VERSION_NUMBER}" VERSION_STRING="${VERSION_STRING}" DEFAULT_USER_AGENT="${DEFAULT_USER_AGENT}")